package com.xctech.yace.util;

public class DirUtil {

    public static String getOrgPath(){
        String path = DirUtil.class.getProtectionDomain().getCodeSource().getLocation().getPath();
        if(System.getProperty("os.name").contains("dows"))
        {
            path = path.substring(1,path.length());
        }
        if(path.contains("jar"))
        {
            path = path.substring(0,path.lastIndexOf("."));
            path = path.substring(0,path.lastIndexOf("/")+1);
            return path;
        }
        return path.replace("target/classes/", "");
    }
}
